#{extends 'CRUD/layout.html' /}
#{set title:messages.get('objects.surveytreatments') /}

<div id="crudList" class="${type.name}">

    <h2 id="crudListTitle">&{'objects.surveytreatments'}</h2>

    <div id="crudListSearch">
        #{crud.search /}
    </div>

    <div id="crudListTable">
        #{crud.table fields:['treatmentDescription', 'medicationDetail', 'treatmentGroup', 'insertion']}
        	#{crud.custom 'treatmentDescription'}
           	  	<span class="hiddenLinks">@{SurveyTreatments.show(object.surveyTreatmentId)}</span>
		      	${object.treatmentDescription}
		   	#{/crud.custom}
		   	#{crud.custom 'medicationDetail'}
           	  	<span class="hiddenLinks">@{MedicationDetails.show(object.medicationDetail.medicationDetailId)}</span>
		      	${object.medicationDetail.medicationDetailName}
		   	#{/crud.custom}
		   	#{crud.custom 'treatmentGroup'}
           	  	<span class="hiddenLinks">@{TreatmentGroups.show(object.treatmentGroup.treatmentGroupId)}</span>
		      	${object.treatmentGroup.treatmentGroupName}
		   	#{/crud.custom}
		   	#{crud.custom 'insertion'}
           	  	<span class="hiddenLinks">@{Insertions.show(object.insertion.insertionId)}</span>
		      	${object.insertion.insertionName}
		   	#{/crud.custom}
        #{/crud.table}
    </div>

    <div id="crudListPagination">
        &{'total', models.SurveyTreatment.count()}
        #{pagination /}
    </div>

    <p id="crudListAdd">
        <a href="@{blank()}">&{'surveyTreatment.add'}</a>
    </p>

</div>
